<template>
    <h2>Live 组件</h2>
</template>
<script lang="ts" setup>
import {
    ref, onBeforeMount,
    onMounted,
    onBeforeUpdate,
    onUpdated,
    onBeforeUnmount ,
    onUnmounted
} from "vue";

console.log('创建');

onBeforeMount(() => {
    console.log('挂载前');
})

onMounted(() => {
    console.log('挂载完毕');
})

onBeforeUpdate(() => {
    console.log('更新前');
})

onUpdated(() => {
    console.log('更新完毕');
})

onBeforeUnmount(() => {
    console.log('卸载前');
})

onUnmounted(() => {
    console.log('卸载完毕');
})

</script>